package com.gui.ssm.service;

import com.gui.ssm.entity.User;
import com.gui.ssm.service.ex.PasswordNotMatchException;
import com.gui.ssm.service.ex.UserNotFoundException;

public interface IUserService {
    /**
     * 用户登录
     * @return 成功登录的用户信息
     * @throws UserNotFoundException 用户名不存在
     * @throws PasswordNotMatchException 密码错误
     */
    User login(User user) throws UserNotFoundException, PasswordNotMatchException;
    /*
     * 用户注册
     * @return 成功注册的用户信息
     * @throws UserNotFoundException 用户名不存在
     * @throws PasswordNotMatchException 密码错误
     */
    User add(User user)throws UserNotFoundException, PasswordNotMatchException;
}
